package com.feri.sh.core.entity.auth;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 4.用户日志表(UserLog)表实体类
 *
 * @author makejava
 * @since 2023-05-10 11:57:30
 */
@Data
@NoArgsConstructor
@TableName("t_user_log")
public class UserLog {
    //序号，主键
    @TableId(type = IdType.AUTO)
    private Integer id;
    //用户id
    private Integer uid;
    //类型：注册 登录 密码找回 修改密码 注销
    private String type;
    //操作的内容
    private String content;
    //操作的ip
    private String ip;
    //创建时间
    private Date ctime;

    public UserLog(Integer uid, String type, String content, String ip) {
        this.uid = uid;
        this.type = type;
        this.content = content;
        this.ip = ip;
        ctime=new Date();
    }

}
